<%= link_to 'New Book',new_product_path%>

<h1>Listing articles</h1>
 
<table>
  <tr>
    <th>Title</th>
    <th>Text</th>
    <th colspan="2"></th>
  </tr>
 
  <% @products.each do |product| %>
    <tr>
      <td><%= product.title %></td>
      <td><%= product.text %></td>
      <td><%= link_to 'Show',product_path(product)%></td>
      <td><%= link_to 'Edit',edit_product_path(product)%></td>
      <td><%= link_to 'Destroy',product_path(product),\
                  method: :delete,data:{confirm: ''"Are you sure?"}%></td>
    </tr>
  <% end %>
</table>